<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/layui/css/layui.css"></link>
<link type="text/css" rel="stylesheet" href="__PUBLIC__/Admin/css/H-ui.css"/>
<link type="text/css" rel="stylesheet" href="__PUBLIC__/Admin/css/H-ui.admin.css"/>
<link type="text/css" rel="stylesheet" href="__PUBLIC__/Admin/font/font-awesome.min.css"/>
<script type="text/javascript" src="__PUBLIC__/Admin/js1/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/layer/layer.js"></script>
<title>编辑一级分类</title>
</head>
<body>
<div class="pd-20 text-c">
    <input type="hidden" id="hid_ccid" value="">
    <input value="{$name}" class="input-text" style="width:250px" type="text"  placeholder="输入分类" id="article-class-val">
</div>
<div class="row cl">
	<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
	<input type="hidden" name="id" value="{$id}">
		<button class="btn btn-success radius" id="commit" name="admin-role-save"><i class="icon-ok"></i> 确定</button>
	</div>
</div>
<script>
$('#commit').click(function(){
	var id=$("input:hidden[name='id']").val();
    var name=$(".input-text").val();
   $.post("__URL__/arcitle_save",{id:id,name:name},function(obj){
	   if(obj.pass==0) {
		   layer.msg(obj.msg,{time:1000,icon:2},function(){
			   location.reload();//刷新页面
		   });
	   }
	   if(obj.pass==1) {
		   layer.msg(obj.msg,{time:1000,icon:1}，function(){
			   location.reload();
		   });
	   }
   })
})
</script>
</body>
</html>